<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ page import="com.scalar.chiptrack.operations.dataentry.forms.SelectProductForm,
                com.scalar.chiptrack.utils.ConfigManager" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/selectProduct.do"/>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>


<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<script>

function selectLocation()
{
	document.selectProduct.action='selectProduct.do?action=select' ; 
	document.selectProduct.submit();
		
}

function getLocations()
{
	if(document.selectProduct.locationName!=null )
	document.selectProduct.locationName.value='0';
	document.selectProduct.action='selectProduct.do?action=location';
	document.selectProduct.submit();
		
}

function fun(id,type,stageName)
{
document.selectProduct.id.value=id;
document.selectProduct.type.value=type;
document.selectProduct.stageName.value=stageName;
document.selectProduct.action="<%=chipTracContext%>/jsp/operations/fab_data_entry.jsp";
document.selectProduct.submit();
}
</script>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/operations/dataentryMenu.jsp" %>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="im<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%" align=right>

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>




<!-- from here your body starts -->
<html:form name="selectProduct"  type="com.scalar.chiptrack.operations.dataentry.forms.SelectProductForm" action="/selectProduct?action=select">
<center><span class="NArialW">FAB Data Entry</span></center>
<p>&nbsp;
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>

<%      String processStepId = (String)request.getAttribute("processStepId");
		String productName   = (String)request.getAttribute("productName");
		String locationId    = (String)request.getAttribute("locationId");
	    String locationName  = (String)request.getAttribute("locationName");
			%>

  
  <input type="hidden" name="stepId" value=<%=processStepId%>>
  <input type="hidden" name="name" value=<%=productName%>>
  <input type="hidden" name="LocId" value=<%=locationId%>>
  <input type="hidden" name="locName" value=<%=locationName%>>
  <input type="hidden" name="id"  value=""> 
  <input type="hidden" name="type"  value="">
  <input type="hidden" name="stageName"  value="">
	



<% 

	
	/*SelectProductForm selectProductForm =(SelectProductForm)request.getAttribute("selectProductForm"); */

  String message = (String)request.getAttribute("ErrMsg");
   if(message==null)
   message=""; %>

<% if(!message.equals("")){%>	
	<p align ="center">
	 <strong><font face="Verdana" size="-5" align="center" color="#ff0000"><b><%=message%></b></font>
    </p>
<% } %>




<font class="NArialL">
</p>
<p align ="center">
<font class="NArialL">Part Number</font>


<html:select property="partNumber"  name="selectProductForm" styleClass="txfield" onchange="getLocations()"  >
<html:option value="0">Select Part Number</html:option>
<html:options collection="partNumberList" property="value"
                  labelProperty="label"/>
</html:select>



<%
//System.out.println("locations "+request.getAttribute("locations"));
if(request.getAttribute("locations")!=null) {%>

<font class="NArialL">Location</font>

<html:select property="locationName"  name="selectProductForm" styleClass="txfield" onchange="selectLocation()"  >
<html:option value="0">Select Location</html:option>
<html:options collection="fabLocationList" property="value"
               labelProperty="label"/>
</html:select>

<%}%>

</p>



<table border="0" width="70%" bordercolor="#FFFFFF" align=center>
   	   <tr>
	   <td width="5%" align="center" bgcolor="#993333"><font class="NArialL">
	   <font color="#FFFFFF">Select</font></td>
       <td width="15%" align="center" bgcolor="#993333"><font class="NArialL">
	   <font color="#FFFFFF">Process Sequence</font></td>
       <td width="20%" align="center" bgcolor="#993333"><font class="NArialL">
	   <font color="#FFFFFF">Process Stage</font></td>
       <td width="30%" align="center" bgcolor="#993333"><font class="NArialL">
	   <font color="#FFFFFF">Comments</font></td>
       </tr>
		
	   <% int bgcount=0;%>
		 <logic:iterate id="fabStageSubStageList" name="fabStageSubStageList">
	    <logic:notEqual parameter="fabStageSubStageList" value="null">
		
		<%bgcount = bgcount+1;%>
        <tr>
		<td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor="#DEE1E2"<%}else{%>bgcolor="#FFFFEE"<%}%>>
		<input type="radio" name="select" onClick="fun('<bean:write name="fabStageSubStageList" property="stageId"/>','<bean:write name="fabStageSubStageList" property="type"/>','<bean:write name="fabStageSubStageList" property="fabStageName"/>')"></td>
        <td width="15%" align="center" <%if(bgcount%2==0){%> bgcolor="#DEE1E2"<%}else{%>bgcolor="#FFFFEE"><%}%><font class="NArialL">
		  <bean:write name="fabStageSubStageList" property="sequence"/></font></td>
          <td width="20%" align="center" <%if(bgcount%2==0){%> bgcolor="#DEE1E2"<%}else{%>bgcolor="#FFFFEE"><%}%>
		  <font class="NArialL"> 
		  <bean:write name="fabStageSubStageList" property="fabStageName"/></font></font></td>

		 <td width="30%" align="center" <%if(bgcount%2==0){%> bgcolor="#DEE1E2"<%}else{%>bgcolor="#FFFFEE"><%}%>
		  <font class="NArialL"> 
		  <bean:write name="fabStageSubStageList" property="comments"/></font></font></td>	

		  </tr>


	  </logic:notEqual>
	  </logic:iterate>
       
      </table>
	 

<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</html:form>
</BODY>
</HTML>
